<?php
$myApp = new Application();
//SETUP LEVEL JIKA: dalam sebuah sub modul memiliki karakteristik level yang berbeda dari umumnya
$myApp->SetLevelAccess(true);

$mData = new DBQueryParse();
$mOutput = new ListTemplate($mData, $myApp->GetCurrentUrl());

$mOutput->SetTitle("DAFTAR OTORITAS");


$mData->SetTableName("view_app_user");

$mData->CreateField();
$mData->SetFieldDB('id_person');

$mData->CreateField();
$mData->SetFieldDB('username');
$mData->SetFieldHeader('Username');

$mData->CreateField();
$mData->SetFieldDB('nama_lengkap');
$mData->SetFieldHeader('Nama Lengkap');

$mData->CreateField();
$mData->SetFieldDB('level');
$mData->SetFieldHeader('Otoritas');

$mData->CreateField();
$mData->SetFieldDB('kategori');
$mData->SetFieldHeader('Kategori');

$mData->CreateField();
$mData->SetFieldDB('DATE_FORMAT(login_l, "%d-%m-%Y %H:%i:%s") as login_l');
$mData->SetFieldHeader('Last Login');

$mData->CreateField();
$mData->SetFieldDB('status_id');
$mData->SetFieldHeader('Status');





//FIELD LIST FORMAT SETTING
////


//FIELD VALIDITAS
/* EMPTY */
////


//FIELD HIDDEN
$mOutput->SetFieldHidden(0);
////


//SET FIELD STATUS USER
$mUser= new CoreUser();
$tStatus= $mUser->GenerateStatusUser();

$mOutput->SetStatusField(6);
$mOutput->SetStatus($tStatus);
////


//OUTPUT SETTING
$mOutput->SetFieldAlign("center", 3);
$mOutput->SetFieldAlign("center", 4);
$mOutput->SetFieldAlign("center", 5);
$mOutput->SetFieldAlign("center", 6);

$mOutput->SetFieldAddClass("smaller", 3);
$mOutput->SetFieldAddClass("smaller", 4);
$mOutput->SetFieldAddClass("smaller", 5);
////


//ACTION SETTING  
$mOutput->SetAddActionCaption("Tambah Otoritas Pengguna");

//ADDITIONAL DATA TRF
/* EMPTY */

//AUTH
$mOutput->SetAddActionAuth(true);
$mOutput->SetDeleteActionAuth(true);
$mOutput->SetUnlockActionAuth(false);
$mOutput->SetResetActionAuth(true);
//TARGET
$mOutput->SetAddActionTarget("main.php?menu=99&submenu=322");
$mOutput->SetEditActionTarget("main.php?menu=99&submenu=322");
$mOutput->SetDeleteActionTarget("main.php?menu=99&submenu=329");
$mOutput->SetResetActionTarget("main.php?menu=99&submenu=328");
$mOutput->PrintList();
?>
